Integrand size = 45, antiderivative size = 768 \[ \int \frac {(a g+b g x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{c i+d i x} \, dx=\frac {b B^2 (b c-a d)^2 g^3 n^2 x}{3 d^3 i}+\frac {7 B (b c-a d)^2 g^3 n (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{3 d^3 i}-\frac {b^2 B (b c-a d) g^3 n (c+d x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{3 d^4 i}+\frac {3 (b c-a d)^2 g^3 (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{d^3 i}-\frac {3 b^2 (b c-a d) g^3 (c+d x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{2 d^4 i}+\frac {b^3 g^3 (c+d x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{3 d^4 i}+\frac {6 B (b c-a d)^3 g^3 n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log \left (\frac {b c-a d}{b (c+d x)}\right )}{d^4 i}+\frac {(b c-a d)^3 g^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2 \log \left (\frac {b c-a d}{b (c+d x)}\right )}{d^4 i}+\frac {B^2 (b c-a d)^3 g^3 n^2 \log \left (\frac {a+b x}{c+d x}\right )}{3 d^4 i}-\frac {2 B^2 (b c-a d)^3 g^3 n^2 \log (c+d x)}{d^4 i}-\frac {7 B (b c-a d)^3 g^3 n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log \left (1-\frac {b (c+d x)}{d (a+b x)}\right )}{3 d^4 i}+\frac {6 B^2 (b c-a d)^3 g^3 n^2 \operatorname {PolyLog}\left (2,\frac {d (a+b x)}{b (c+d x)}\right )}{d^4 i}+\frac {2 B (b c-a d)^3 g^3 n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \operatorname {PolyLog}\left (2,\frac {d (a+b x)}{b (c+d x)}\right )}{d^4 i}+\frac {7 B^2 (b c-a d)^3 g^3 n^2 \operatorname {PolyLog}\left (2,\frac {b (c+d x)}{d (a+b x)}\right )}{3 d^4 i}-\frac {2 B^2 (b c-a d)^3 g^3 n^2 \operatorname {PolyLog}\left (3,\frac {d (a+b x)}{b (c+d x)}\right )}{d^4 i} \]
1/3*b*B^2*(-a*d+b*c)^2*g^3*n^2*x/d^3/i+7/3*B*(-a*d+b*c)^2*g^3*n*(b*x+a)*(A +B*ln(e*((b*x+a)/(d*x+c))^n))/d^3/i-1/3*b^2*B*(-a*d+b*c)*g^3*n*(d*x+c)^2*( A+B*ln(e*((b*x+a)/(d*x+c))^n))/d^4/i+3*(-a*d+b*c)^2*g^3*(b*x+a)*(A+B*ln(e* ((b*x+a)/(d*x+c))^n))^2/d^3/i-3/2*b^2*(-a*d+b*c)*g^3*(d*x+c)^2*(A+B*ln(e*( (b*x+a)/(d*x+c))^n))^2/d^4/i+1/3*b^3*g^3*(d*x+c)^3*(A+B*ln(e*((b*x+a)/(d*x +c))^n))^2/d^4/i+6*B*(-a*d+b*c)^3*g^3*n*(A+B*ln(e*((b*x+a)/(d*x+c))^n))*ln ((-a*d+b*c)/b/(d*x+c))/d^4/i+(-a*d+b*c)^3*g^3*(A+B*ln(e*((b*x+a)/(d*x+c))^ n))^2*ln((-a*d+b*c)/b/(d*x+c))/d^4/i+1/3*B^2*(-a*d+b*c)^3*g^3*n^2*ln((b*x+ a)/(d*x+c))/d^4/i-2*B^2*(-a*d+b*c)^3*g^3*n^2*ln(d*x+c)/d^4/i-7/3*B*(-a*d+b *c)^3*g^3*n*(A+B*ln(e*((b*x+a)/(d*x+c))^n))*ln(1-b*(d*x+c)/d/(b*x+a))/d^4/ i+6*B^2*(-a*d+b*c)^3*g^3*n^2*polylog(2,d*(b*x+a)/b/(d*x+c))/d^4/i+2*B*(-a* d+b*c)^3*g^3*n*(A+B*ln(e*((b*x+a)/(d*x+c))^n))*polylog(2,d*(b*x+a)/b/(d*x+ c))/d^4/i+7/3*B^2*(-a*d+b*c)^3*g^3*n^2*polylog(2,b*(d*x+c)/d/(b*x+a))/d^4/ i-2*B^2*(-a*d+b*c)^3*g^3*n^2*polylog(3,d*(b*x+a)/b/(d*x+c))/d^4/i
Time = 1.03 (sec) , antiderivative size = 1072, normalized size of antiderivative = 1.40 \[ \int \frac {(a g+b g x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{c i+d i x} \, dx=\frac {g^3 \left (6 b d (b c-a d)^2 x \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2+3 d^2 (-b c+a d) (a+b x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2+2 d^3 (a+b x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2-6 A^2 (b c-a d)^3 \log (c+d x)+12 A B (b c-a d)^3 \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \log \left (\frac {b c-a d}{b c+b d x}\right )+6 B^2 (b c-a d)^3 \log ^2\left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \log \left (\frac {b c-a d}{b c+b d x}\right )-6 A B (b c-a d)^3 n \left (\log \left (\frac {b c-a d}{b c+b d x}\right ) \left (2 \log \left (\frac {d (a+b x)}{-b c+a d}\right )+\log \left (\frac {b c-a d}{b c+b d x}\right )\right )-2 \operatorname {PolyLog}\left (2,\frac {b (c+d x)}{b c-a d}\right )\right )+6 B (b c-a d)^2 n \left (2 a d \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )-2 b c \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)-a B d n \left (\log (a+b x) \left (\log (a+b x)-2 \log \left (\frac {b (c+d x)}{b c-a d}\right )\right )-2 \operatorname {PolyLog}\left (2,\frac {d (a+b x)}{-b c+a d}\right )\right )+b B c n \left (\left (2 \log \left (\frac {d (a+b x)}{-b c+a d}\right )-\log (c+d x)\right ) \log (c+d x)+2 \operatorname {PolyLog}\left (2,\frac {b (c+d x)}{b c-a d}\right )\right )\right )+3 B (b c-a d)^2 n \left (2 A b d x+2 B d (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-2 B (b c-a d) n \log (c+d x)-2 (b c-a d) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)+B (b c-a d) n \left (\left (2 \log \left (\frac {d (a+b x)}{-b c+a d}\right )-\log (c+d x)\right ) \log (c+d x)+2 \operatorname {PolyLog}\left (2,\frac {b (c+d x)}{b c-a d}\right )\right )\right )+2 B (b c-a d) n \left (2 A b d (b c-a d) x+2 B d (b c-a d) (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-d^2 (a+b x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )-2 B (b c-a d)^2 n \log (c+d x)-2 (b c-a d)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)+B (b c-a d) n (b d x+(-b c+a d) \log (c+d x))+B (b c-a d)^2 n \left (\left (2 \log \left (\frac {d (a+b x)}{-b c+a d}\right )-\log (c+d x)\right ) \log (c+d x)+2 \operatorname {PolyLog}\left (2,\frac {b (c+d x)}{b c-a d}\right )\right )\right )+12 B^2 (b c-a d)^3 n \left (\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \operatorname {PolyLog}\left (2,\frac {d (a+b x)}{b (c+d x)}\right )-n \operatorname {PolyLog}\left (3,\frac {d (a+b x)}{b (c+d x)}\right )\right )\right )}{6 d^4 i} \]
(g^3*(6*b*d*(b*c - a*d)^2*x*(A + B*Log[e*((a + b*x)/(c + d*x))^n])^2 + 3*d ^2*(-(b*c) + a*d)*(a + b*x)^2*(A + B*Log[e*((a + b*x)/(c + d*x))^n])^2 + 2 *d^3*(a + b*x)^3*(A + B*Log[e*((a + b*x)/(c + d*x))^n])^2 - 6*A^2*(b*c - a *d)^3*Log[c + d*x] + 12*A*B*(b*c - a*d)^3*Log[e*((a + b*x)/(c + d*x))^n]*L og[(b*c - a*d)/(b*c + b*d*x)] + 6*B^2*(b*c - a*d)^3*Log[e*((a + b*x)/(c + d*x))^n]^2*Log[(b*c - a*d)/(b*c + b*d*x)] - 6*A*B*(b*c - a*d)^3*n*(Log[(b* c - a*d)/(b*c + b*d*x)]*(2*Log[(d*(a + b*x))/(-(b*c) + a*d)] + Log[(b*c - a*d)/(b*c + b*d*x)]) - 2*PolyLog[2, (b*(c + d*x))/(b*c - a*d)]) + 6*B*(b*c - a*d)^2*n*(2*a*d*Log[a + b*x]*(A + B*Log[e*((a + b*x)/(c + d*x))^n]) - 2 *b*c*(A + B*Log[e*((a + b*x)/(c + d*x))^n])*Log[c + d*x] - a*B*d*n*(Log[a + b*x]*(Log[a + b*x] - 2*Log[(b*(c + d*x))/(b*c - a*d)]) - 2*PolyLog[2, (d *(a + b*x))/(-(b*c) + a*d)]) + b*B*c*n*((2*Log[(d*(a + b*x))/(-(b*c) + a*d )] - Log[c + d*x])*Log[c + d*x] + 2*PolyLog[2, (b*(c + d*x))/(b*c - a*d)]) ) + 3*B*(b*c - a*d)^2*n*(2*A*b*d*x + 2*B*d*(a + b*x)*Log[e*((a + b*x)/(c + d*x))^n] - 2*B*(b*c - a*d)*n*Log[c + d*x] - 2*(b*c - a*d)*(A + B*Log[e*(( a + b*x)/(c + d*x))^n])*Log[c + d*x] + B*(b*c - a*d)*n*((2*Log[(d*(a + b*x ))/(-(b*c) + a*d)] - Log[c + d*x])*Log[c + d*x] + 2*PolyLog[2, (b*(c + d*x ))/(b*c - a*d)])) + 2*B*(b*c - a*d)*n*(2*A*b*d*(b*c - a*d)*x + 2*B*d*(b*c - a*d)*(a + b*x)*Log[e*((a + b*x)/(c + d*x))^n] - d^2*(a + b*x)^2*(A + B*L og[e*((a + b*x)/(c + d*x))^n]) - 2*B*(b*c - a*d)^2*n*Log[c + d*x] - 2*(...
Time = 1.10 (sec) , antiderivative size = 679, normalized size of antiderivative = 0.88, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {2961, 2795, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {(a g+b g x)^3 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{c i+d i x} \, dx\) |
\(\Big \downarrow \) 2961 |
\(\displaystyle \frac {g^3 (b c-a d)^3 \int \frac {(a+b x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(c+d x)^3 \left (b-\frac {d (a+b x)}{c+d x}\right )^4}d\frac {a+b x}{c+d x}}{i}\) |
\(\Big \downarrow \) 2795 |
\(\displaystyle \frac {g^3 (b c-a d)^3 \int \left (\frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2 b^3}{d^3 \left (b-\frac {d (a+b x)}{c+d x}\right )^4}-\frac {3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2 b^2}{d^3 \left (b-\frac {d (a+b x)}{c+d x}\right )^3}+\frac {3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2 b}{d^3 \left (b-\frac {d (a+b x)}{c+d x}\right )^2}-\frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{d^3 \left (b-\frac {d (a+b x)}{c+d x}\right )}\right )d\frac {a+b x}{c+d x}}{i}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {g^3 (b c-a d)^3 \left (\frac {b^3 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{3 d^4 \left (b-\frac {d (a+b x)}{c+d x}\right )^3}-\frac {3 b^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{2 d^4 \left (b-\frac {d (a+b x)}{c+d x}\right )^2}-\frac {b^2 B n \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{3 d^4 \left (b-\frac {d (a+b x)}{c+d x}\right )^2}+\frac {2 B n \operatorname {PolyLog}\left (2,\frac {d (a+b x)}{b (c+d x)}\right ) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{d^4}+\frac {\log \left (1-\frac {d (a+b x)}{b (c+d x)}\right ) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{d^4}+\frac {6 B n \log \left (1-\frac {d (a+b x)}{b (c+d x)}\right ) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{d^4}-\frac {7 B n \log \left (1-\frac {b (c+d x)}{d (a+b x)}\right ) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{3 d^4}+\frac {3 (a+b x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{d^3 (c+d x) \left (b-\frac {d (a+b x)}{c+d x}\right )}+\frac {7 B n (a+b x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{3 d^3 (c+d x) \left (b-\frac {d (a+b x)}{c+d x}\right )}+\frac {6 B^2 n^2 \operatorname {PolyLog}\left (2,\frac {d (a+b x)}{b (c+d x)}\right )}{d^4}+\frac {7 B^2 n^2 \operatorname {PolyLog}\left (2,\frac {b (c+d x)}{d (a+b x)}\right )}{3 d^4}-\frac {2 B^2 n^2 \operatorname {PolyLog}\left (3,\frac {d (a+b x)}{b (c+d x)}\right )}{d^4}+\frac {b B^2 n^2}{3 d^4 \left (b-\frac {d (a+b x)}{c+d x}\right )}+\frac {B^2 n^2 \log \left (\frac {a+b x}{c+d x}\right )}{3 d^4}+\frac {2 B^2 n^2 \log \left (b-\frac {d (a+b x)}{c+d x}\right )}{d^4}\right )}{i}\) |
((b*c - a*d)^3*g^3*((b*B^2*n^2)/(3*d^4*(b - (d*(a + b*x))/(c + d*x))) - (b ^2*B*n*(A + B*Log[e*((a + b*x)/(c + d*x))^n]))/(3*d^4*(b - (d*(a + b*x))/( c + d*x))^2) + (7*B*n*(a + b*x)*(A + B*Log[e*((a + b*x)/(c + d*x))^n]))/(3 *d^3*(c + d*x)*(b - (d*(a + b*x))/(c + d*x))) + (b^3*(A + B*Log[e*((a + b* x)/(c + d*x))^n])^2)/(3*d^4*(b - (d*(a + b*x))/(c + d*x))^3) - (3*b^2*(A + B*Log[e*((a + b*x)/(c + d*x))^n])^2)/(2*d^4*(b - (d*(a + b*x))/(c + d*x)) ^2) + (3*(a + b*x)*(A + B*Log[e*((a + b*x)/(c + d*x))^n])^2)/(d^3*(c + d*x )*(b - (d*(a + b*x))/(c + d*x))) + (B^2*n^2*Log[(a + b*x)/(c + d*x)])/(3*d ^4) + (2*B^2*n^2*Log[b - (d*(a + b*x))/(c + d*x)])/d^4 + (6*B*n*(A + B*Log [e*((a + b*x)/(c + d*x))^n])*Log[1 - (d*(a + b*x))/(b*(c + d*x))])/d^4 + ( (A + B*Log[e*((a + b*x)/(c + d*x))^n])^2*Log[1 - (d*(a + b*x))/(b*(c + d*x ))])/d^4 - (7*B*n*(A + B*Log[e*((a + b*x)/(c + d*x))^n])*Log[1 - (b*(c + d *x))/(d*(a + b*x))])/(3*d^4) + (6*B^2*n^2*PolyLog[2, (d*(a + b*x))/(b*(c + d*x))])/d^4 + (2*B*n*(A + B*Log[e*((a + b*x)/(c + d*x))^n])*PolyLog[2, (d *(a + b*x))/(b*(c + d*x))])/d^4 + (7*B^2*n^2*PolyLog[2, (b*(c + d*x))/(d*( a + b*x))])/(3*d^4) - (2*B^2*n^2*PolyLog[3, (d*(a + b*x))/(b*(c + d*x))])/ d^4))/i
3.2.86.3.1 Defintions of rubi rules used
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = ExpandIntegrand[(a + b*Log[ c*x^n])^p, (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b , c, d, e, f, m, n, p, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0 ] && IntegerQ[m] && IntegerQ[r]))
Int[((A_.) + Log[(e_.)*(((a_.) + (b_.)*(x_))/((c_.) + (d_.)*(x_)))^(n_.)]*( B_.))^(p_.)*((f_.) + (g_.)*(x_))^(m_.)*((h_.) + (i_.)*(x_))^(q_.), x_Symbol ] :> Simp[(b*c - a*d)^(m + q + 1)*(g/b)^m*(i/d)^q Subst[Int[x^m*((A + B*L og[e*x^n])^p/(b - d*x)^(m + q + 2)), x], x, (a + b*x)/(c + d*x)], x] /; Fre eQ[{a, b, c, d, e, f, g, h, i, A, B, n, p}, x] && NeQ[b*c - a*d, 0] && EqQ[ b*f - a*g, 0] && EqQ[d*h - c*i, 0] && IntegersQ[m, q]
\[\int \frac {\left (b g x +a g \right )^{3} {\left (A +B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )\right )}^{2}}{d i x +c i}d x\]
\[ \int \frac {(a g+b g x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{c i+d i x} \, dx=\int { \frac {{\left (b g x + a g\right )}^{3} {\left (B \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right ) + A\right )}^{2}}{d i x + c i} \,d x } \]
integral((A^2*b^3*g^3*x^3 + 3*A^2*a*b^2*g^3*x^2 + 3*A^2*a^2*b*g^3*x + A^2* a^3*g^3 + (B^2*b^3*g^3*x^3 + 3*B^2*a*b^2*g^3*x^2 + 3*B^2*a^2*b*g^3*x + B^2 *a^3*g^3)*log(e*((b*x + a)/(d*x + c))^n)^2 + 2*(A*B*b^3*g^3*x^3 + 3*A*B*a* b^2*g^3*x^2 + 3*A*B*a^2*b*g^3*x + A*B*a^3*g^3)*log(e*((b*x + a)/(d*x + c)) ^n))/(d*i*x + c*i), x)
Timed out. \[ \int \frac {(a g+b g x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{c i+d i x} \, dx=\text {Timed out} \]
\[ \int \frac {(a g+b g x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{c i+d i x} \, dx=\int { \frac {{\left (b g x + a g\right )}^{3} {\left (B \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right ) + A\right )}^{2}}{d i x + c i} \,d x } \]
3*A^2*a^2*b*g^3*(x/(d*i) - c*log(d*x + c)/(d^2*i)) - 1/6*A^2*b^3*g^3*(6*c^ 3*log(d*x + c)/(d^4*i) - (2*d^2*x^3 - 3*c*d*x^2 + 6*c^2*x)/(d^3*i)) + 3/2* A^2*a*b^2*g^3*(2*c^2*log(d*x + c)/(d^3*i) + (d*x^2 - 2*c*x)/(d^2*i)) + A^2 *a^3*g^3*log(d*i*x + c*i)/(d*i) + 1/6*(2*B^2*b^3*d^3*g^3*x^3 - 3*(b^3*c*d^ 2*g^3 - 3*a*b^2*d^3*g^3)*B^2*x^2 + 6*(b^3*c^2*d*g^3 - 3*a*b^2*c*d^2*g^3 + 3*a^2*b*d^3*g^3)*B^2*x - 6*(b^3*c^3*g^3 - 3*a*b^2*c^2*d*g^3 + 3*a^2*b*c*d^ 2*g^3 - a^3*d^3*g^3)*B^2*log(d*x + c))*log((d*x + c)^n)^2/(d^4*i) - integr ate(-1/3*(3*B^2*a^3*d^3*g^3*log(e)^2 + 6*A*B*a^3*d^3*g^3*log(e) + 3*(B^2*b ^3*d^3*g^3*log(e)^2 + 2*A*B*b^3*d^3*g^3*log(e))*x^3 + 9*(B^2*a*b^2*d^3*g^3 *log(e)^2 + 2*A*B*a*b^2*d^3*g^3*log(e))*x^2 + 3*(B^2*b^3*d^3*g^3*x^3 + 3*B ^2*a*b^2*d^3*g^3*x^2 + 3*B^2*a^2*b*d^3*g^3*x + B^2*a^3*d^3*g^3)*log((b*x + a)^n)^2 + 9*(B^2*a^2*b*d^3*g^3*log(e)^2 + 2*A*B*a^2*b*d^3*g^3*log(e))*x + 6*(B^2*a^3*d^3*g^3*log(e) + A*B*a^3*d^3*g^3 + (B^2*b^3*d^3*g^3*log(e) + A *B*b^3*d^3*g^3)*x^3 + 3*(B^2*a*b^2*d^3*g^3*log(e) + A*B*a*b^2*d^3*g^3)*x^2 + 3*(B^2*a^2*b*d^3*g^3*log(e) + A*B*a^2*b*d^3*g^3)*x)*log((b*x + a)^n) - (6*B^2*a^3*d^3*g^3*log(e) + 6*A*B*a^3*d^3*g^3 + 2*(3*A*B*b^3*d^3*g^3 + (g^ 3*n + 3*g^3*log(e))*B^2*b^3*d^3)*x^3 - 6*(b^3*c^3*g^3*n - 3*a*b^2*c^2*d*g^ 3*n + 3*a^2*b*c*d^2*g^3*n - a^3*d^3*g^3*n)*B^2*log(d*x + c) + 3*(6*A*B*a*b ^2*d^3*g^3 - (b^3*c*d^2*g^3*n - 3*(g^3*n + 2*g^3*log(e))*a*b^2*d^3)*B^2)*x ^2 + 6*(3*A*B*a^2*b*d^3*g^3 + (b^3*c^2*d*g^3*n - 3*a*b^2*c*d^2*g^3*n + ...
\[ \int \frac {(a g+b g x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{c i+d i x} \, dx=\int { \frac {{\left (b g x + a g\right )}^{3} {\left (B \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right ) + A\right )}^{2}}{d i x + c i} \,d x } \]
Timed out. \[ \int \frac {(a g+b g x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{c i+d i x} \, dx=\int \frac {{\left (a\,g+b\,g\,x\right )}^3\,{\left (A+B\,\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )\right )}^2}{c\,i+d\,i\,x} \,d x \]